<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>

<style>
#preview{
	position:absolute;
	border:1px solid #ccc;
	background:#333;
	padding:5px;
	display:none;
	color:#fff;
	}

/*  */
</style>

    <s:form action="saveTemplate.htm" method="post" theme="simple">
    	<table>
    		<s:if test="%{templateList.size > 0}">
    		<s:iterator value="templateList" status="rowStatus" var="template">
    		<s:if test="#rowStatus.index % 5 == 0">
    			<tr>
    		</s:if>
	    			<td>
	    				<table>
							<tr>
								<td><s:radio list="#{templateId:name}" name="shopSettings.template.templateId" theme="simple" value="checkedInt" /></td>
							</tr>
							<tr>
								<td>
									<a href="<s:text name="shopSettingPath" />" class="preview"><img src="<s:text name="shopSettingPath" />" class="product-border" width="120" height="93"/></a>
								</td>
							</tr>
						</table>
					</td>
			<s:if test="#rowStatus.count % 5 == 0">
				</tr>
			</s:if>
			</s:iterator>
			</s:if>
			<s:else>
				<s:text name="changeTemplate.para" />
			</s:else>
			</table>
			<table width="100%">
					<tr>
						<td align="center">
							<table border="0" cellspacing="0" cellpadding="0" >
								<tr>
									<td class="btn-grey-left1"></td>
									<td class="btn-grey-middle1 ">
										<s:submit key="label.template.save" name="save" theme="simple" cssClass="submit-btn-common" />
									</td>
									<td class="btn-grey-right1"></td>
								</tr>
							</table>
						</td>
					</tr>
			</table>
			<s:hidden name="shopSettings.description"/>
			<s:hidden name="shopSettings.title"/>
			<s:hidden name="shopSettings.shopId"/>
    </s:form>
